﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security;
using System.Text;
using System.Text.RegularExpressions;

// ReSharper disable CheckNamespace
namespace ini
// ReSharper restore CheckNamespace
{
	/// <summary>
	/// Holds, changes and creates ini files. A simple, easy to use and safe way to handle ini 
	/// files.
	/// </summary>
	public class InIReader :
		IEnumerable<KeyValuePair<string, InISection>>
	{
		private static readonly Regex regexSection = new Regex("(^[ \t]+$|[\n\\]\\[]+)");
		private static readonly Regex regexSectionMatch = new Regex("^\\[([^\n\\[\\]]+[^ \n\t\\[\\]]*[^\n\\[\\]]+|[^ \n\t\\[\\]]*)\\]$");
		private static readonly Regex regexEntry = new Regex("=");

		private readonly Dictionary<string, InISection> sections = new Dictionary<string, InISection>();

		#region construction

		/// <summary>
		///     InItializes a new instance of the <see cref="InIReader" /> class.
		/// </summary>
		public InIReader()
		{	}

		/// <summary>
		///     InItializes a new instance of the <see cref="InIReader" /> class.
		/// </summary>
		/// <param name="inIReader">The InI reader.</param>
		/// <exception cref="ArgumentNullException">the Reader is null.</exception> 
// ReSharper disable UnusedMember.Global
		public InIReader(InIReader inIReader)
// ReSharper restore UnusedMember.Global
			: this()
		{
			if (inIReader == null)
				throw new ArgumentNullException("The ini file must not be null.");

			inIReader.CopyTo(this);
		}

		/// <summary>
		///     InItializes a new instance of the <see cref="InIReader" /> class.
		/// </summary>
		/// <param name="stream">The stream.</param>
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
// ReSharper disable UnusedMember.Global
		public InIReader(StreamReader stream)
// ReSharper restore UnusedMember.Global
			: this()
		{
			Open(stream);
		}

		/// <summary>
		///     InItializes a new instance of the <see cref="InIReader" /> class.
		/// </summary>
		/// <param name="file">The file.</param>
		/// <exception cref="System.ArgumentException">path is an empty string ("").</exception>
		/// <exception cref="ArgumentNullException">path is null.</exception>
		/// <exception cref="FileNotFoundException">The file cannot be found.</exception>
		/// <exception cref="IOException">path includes an incorrect or invalid syntax for file name, directory name, or volume label.
		/// </exception>
		/// <exception cref="DirectoryNotFoundException">The specified path is invalid, such as being on an unmapped drive.</exception> 
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
		public InIReader(string file)
			: this()
		{
			Open(file);
		}

		#endregion construction

		#region file io

		/// <summary>
		///     Opens the specified file and tries to parse the file.
		/// </summary>
		/// <param name="file">The file.</param>
		/// <exception cref="System.ArgumentException">path is an empty string ("").</exception>
		/// <exception cref="ArgumentNullException">path is null.</exception>
		/// <exception cref="FileNotFoundException">The file cannot be found.</exception>
		/// <exception cref="IOException">path includes an incorrect or invalid syntax for file name, directory name, or volume label.
		/// </exception>
		/// <exception cref="DirectoryNotFoundException">The specified path is invalid, such as being on an unmapped drive.</exception> 
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void Open(string file)
// ReSharper restore MemberCanBePrivate.Global
		{
			StreamReader stream = new StreamReader(file);
			Open(stream);
			stream.Close();
		}

		/// <summary>
		///     Tries to parse the given stream.
		/// </summary>
		/// <param name="stream">The stream.</param>
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void Open(StreamReader stream)
// ReSharper restore MemberCanBePrivate.Global
		{
			ParseStream(stream);
		}

		/// <summary>
		/// Parses the specified string.
		/// </summary>
		/// <param name="str">The text which  will be parsed.</param>
		/// <exception cref="ArgumentNullException">string is null.</exception>
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
		public void Parse(string str)
		{
			Open(new StreamReader(new MemoryStream(Encoding.Default.GetBytes(str))));
		}

		/// <summary>
		///     Saves the ini reader to the specified file.
		/// </summary>
		/// <param name="file">The file.</param>
		/// <param name="append">
		///     if set to <c>true</c> [append].
		/// </param>
		/// <exception cref="UnauthorizedAccessException">Access is denied.</exception>
		/// <exception cref="ArgumentException">path is empty. -or-path contains the name of a system device (com1, com2, and so on).
		/// </exception>
		/// <exception cref="ArgumentNullException">path is null.</exception>
		/// <exception cref="DirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
		/// <exception cref="IOException">path includes an incorrect or invalid syntax for file name, directory name, or volume label syntax.</exception>
		/// <exception cref="PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must not exceed 248 characters, and file names must not exceed 260 characters.</exception>
		/// <exception cref="SecurityException"> The caller does not have the required permission.</exception>
		/// <exception cref="IOException">An I/O error occurs.</exception>
		public void Save(string file, bool append = false)
		{
			StreamWriter stream = new StreamWriter(file, append);
			Save(stream);
			stream.Close();
		}

		/// <summary>
		///     Saves the specified stream.
		/// </summary>
		/// <param name="stream">The stream.</param>
		/// <exception cref="ObjectDisposedException">System.IO.StreamWriter.AutoFlush is true or the System.IO.StreamWriter buffer is full, and current writer is closed.</exception>
		/// <exception cref="NotSupportedException">System.IO.StreamWriter.AutoFlush is true or the System.IO.StreamWriter buffer is full, and the contents of the buffer cannot be written to the underlying fixed size stream because the System.IO.StreamWriter is at the end the stream.</exception>
		/// <exception cref="IOException">An I/O error occurs.</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void Save(StreamWriter stream)
// ReSharper restore MemberCanBePrivate.Global
		{
			if (stream == null)
				throw new ArgumentNullException("Unable to parse stream: the stream is null");

			stream.Write(ToString());
		}


		/// <summary>
		/// Parses the stream.
		/// </summary>
		/// <param name="stream">The stream.</param>
		/// <exception cref="FormatException">The ini file is wrong formatted</exception>
		/// <exception cref="ArgumentNullException">stream was null</exception>
		private void ParseStream(StreamReader stream)
		{
			if(stream == null)
				throw new ArgumentNullException("Unable to parse stream: the stream is null");

			Clear();

			string line;
			string lastKey = null;
			InISection section = Add("global");

			while ((line = stream.ReadLine()) != null)
			{
				if (!String.IsNullOrWhiteSpace(line))
				{
					if (regexSectionMatch.IsMatch(line))
					{
						var sec = DecodeSectionName(line);
						section = !ContainsKey(sec) ? Add(sec) : this[sec];
					}
					else if (regexEntry.IsMatch(line))
					{
						lastKey = DecodeKey(line);
						var val = DecodeValue(line);

						if (!section.ContainsKey(lastKey))
						{
							section.Add(lastKey, val);
						}
						else
						{
							section[lastKey] = val;
						}
					}
					else if (!String.IsNullOrWhiteSpace(lastKey))
					{
						if (!section.ContainsKey(lastKey))
						{
							section.Add(line, lastKey);
						}
						else
						{
							section[lastKey] += '\n' + DecodeLine(line);
						}
					}
					else
					{
						throw new FormatException("Unable to parse the given Stream: Bad Format");
					}
				}
			}
		}

		/// <summary>
		/// Decodes the line.
		/// </summary>
		/// <param name="line">The line.</param>
		/// <returns>the decoded line</returns>
		private static string DecodeLine(string line)
		{
			string value = line.Trim();
			if (line.StartsWith("\"") && line.EndsWith("\""))
				return value.Substring(1, value.Length - 2);
			return value;
		}

		/// <summary>
		/// Decodes the value.
		/// </summary>
		/// <param name="line">The line.</param>
		/// <returns>the decoded value</returns>
		private static string DecodeValue(string line)
		{
			string value = line.Substring(line.IndexOf('=') + 1).Trim();
			if (line.StartsWith("\"") && line.EndsWith("\""))
				return value.Substring(1, value.Length - 2);
			return value;
		}

		/// <summary>
		/// Decodes the key.
		/// </summary>
		/// <param name="line">The line.</param>
		/// <returns>the decoded key</returns>
		private static string DecodeKey(string line)
		{
			// since there is no encoding for keys, the decoding is this simple
			return line.Substring(0, line.IndexOf('=')).Trim();
		}

		/// <summary>
		/// Decodes the name of the section.
		/// </summary>
		/// <param name="line">The line.</param>
		/// <returns>the decoded section name</returns>
		private string DecodeSectionName(string line)
		{
			line = line.Trim();
			return line.Substring(1, line.Length-2);
		}

		#endregion file io

		#region io methods

		/// <summary>
		/// Returns true if the given key has a valid format. Before adding a new entry, every key
		/// has to pass this validation.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <returns>true if the given key has a valid format; otherwise false</returns>
// ReSharper disable UnusedMember.Global
		public static bool ValidateKey(string key)
// ReSharper restore UnusedMember.Global
		{
			return InISection.ValidateKey(key);
		}

		/// <summary>
		/// Returns true if the given section name has a valid format. Before adding a new entry, every key
		/// has to pass this validation.
		/// </summary>
		/// <param name="section">The key.</param>
		/// <returns>true if the given key has a valid format; otherwise false</returns>
// ReSharper disable MemberCanBePrivate.Global
		public static bool ValidateSection(string section)
// ReSharper restore MemberCanBePrivate.Global
		{
			return !regexSection.IsMatch(section);
		}

		/// <summary>
		///     Clears this instance.
		/// </summary>
// ReSharper disable MemberCanBePrivate.Global
		public void Clear()
// ReSharper restore MemberCanBePrivate.Global
		{
			sections.Clear();
		}

		/// <summary>
		///     Copies this instance to the given one.
		/// </summary>
		/// <param name="ini">The InI reader.</param>
		/// <exception cref="ArgumentNullException">The reader was null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void CopyTo(InIReader ini)
// ReSharper restore MemberCanBePrivate.Global
		{
			if(ini == null)
				throw new ArgumentNullException("the reader was null");

			ini.Clear();
			ini.Add(this);
		}

		/// <summary>
		///     Determines whether this InI file contains the specified key.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <returns>
		///     <c>true</c> if this InI file contains the specified key; otherwise, <c>false</c>.
		/// </returns>
		public bool ContainsKey(string key)
		{
			return !String.IsNullOrWhiteSpace(key) && sections.ContainsKey(key);
		}

		/// <summary>
		///     Adds the specified section to this reader.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <param name="section">The key.</param>
		/// <exception cref="System.ArgumentNullException"> The key and the section must not be empty.</exception>
		/// <exception cref="System.ArgumentException">invalid section name.</exception>
		/// <exception cref="System.ArgumentException">section does already exist.</exception>
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
		public void Add(string key, IEnumerable<KeyValuePair<string, string>> section)
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore UnusedMember.Global
		{
			Add(key).Add(section);
		}

		/// <summary>
		///     Adds the specified InI reader's sections.
		/// </summary>
		/// <param name="inIReader">The InI reader.</param>
		/// <param name="replace">
		///     if set to <c>true</c> [replace].
		/// </param>
		public void Add(IEnumerable<KeyValuePair<string, InISection>> inIReader, bool replace = true)
		{
			foreach (var pair in inIReader)
			{
				if (sections.ContainsKey(pair.Key))
				{
					Get(pair.Key).Add(pair.Value, replace);
				}
				else
				{
					Add(pair.Key).Add(pair.Value, replace);
				}
			}
		}

		/// <summary>
		/// Sets the section associated with the key. If replace the is set to false, the section will be appended,
		/// otherwise a copy of the new section will replace the current section.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <param name="section">The section.</param>
		/// <param name="replace">if set to <c>true</c> the section will be [replaced]. by a copy of the given section,</param> 
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="System.ArgumentOutOfRangeException">InIReader does not Contain the searched section</exception>	
		/// <exception cref="System.ArgumentNullException">The keys and the section must not be empty</exception>
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
		public void Set(string key, IEnumerable<KeyValuePair<string, string>> section, bool replace = true)
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore UnusedMember.Global
		{
			if(replace)
				Get(key).Clear();

			Get(key).Add(section);
		}

		/// <summary> Gets the specified section. </summary>
		/// <param name="section">The key.</param>
		/// <returns> The InISection associated with the key</returns>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="System.ArgumentOutOfRangeException">InIReader does not Contain the searched section</exception>
		// ReSharper disable MemberCanBePrivate.Global
		public InISection Get(string section)
		// ReSharper restore MemberCanBePrivate.Global
		{
			if (String.IsNullOrEmpty(section))
				throw new ArgumentNullException("The section must not be null or empty");

			if (!sections.ContainsKey(section))
				throw new ArgumentOutOfRangeException(String.Format("InIReader does not Contain the searched section: {0}",
																	section));

			return sections[section];
		}

		/// <summary>
		///     Get's the section associated with the key.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <param name="section">The section.</param>
		/// <returns>true if the reader contains an element with the specified key; otherwise, false.</returns>
		// ReSharper disable UnusedMember.Global
		public bool TryGet(string key, out InISection section)
		// ReSharper restore UnusedMember.Global
		{
			section = default(InISection);
			return !String.IsNullOrWhiteSpace(key) && sections.TryGetValue(key, out section);
		}

		/// <summary>
		///     Removes the specified section from the reader..
		/// </summary>
		/// <param name="key">The key.</param>
		/// <returns>true if the key was removed; otherwise false</returns>
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedMethodReturnValue.Global
		public bool Remove(string key)
// ReSharper restore UnusedMethodReturnValue.Global
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore UnusedMember.Global
		{
			return !String.IsNullOrWhiteSpace(key) && sections.Remove(key);
		}

		/// <summary>
		/// Renames the specified section.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <param name="newKey">The new key.</param>
		/// <exception cref="System.ArgumentException">
		///     An Invalid key causes an Exception. The exception is also raised if this section
		///     does not contain the key.
		/// </exception>
		/// <exception cref="System.ArgumentNullException">
		///     The key must not be empty. The value may be null, but not the key.
		/// </exception>
// ReSharper disable UnusedMember.Global
		public void Rename(string key, string newKey)
			// ReSharper restore UnusedMember.Global
		{
			if (String.IsNullOrWhiteSpace(newKey))
				throw new ArgumentNullException("The key must not be null or empty");

			if (!ValidateSection(newKey))
				throw new ArgumentException(String.Format("Key contains invalid characters or has the wrong format: \"{0}\"",
				                                          key));

			if (!ContainsKey(key))
				throw new ArgumentException(String.Format("The section does not contain the entry {0}", key));

			InISection tmp = Get(key);
			Remove(key);
			Add(newKey, tmp);
		}

		/// <summary>
		///     Adds the specified key.
		/// </summary>
		/// <param name="key">The key.</param>
		/// <returns></returns>
		/// <exception cref="System.ArgumentException">invalid section name.</exception>
		/// <exception cref="System.ArgumentException">section does already exist.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public InISection Add(string key)
// ReSharper restore MemberCanBePrivate.Global
		{
			if (!ValidateSection(key))
				throw new ArgumentException(
					String.Format("Section name contains invalid characters or has the wrong format: \"{0}\"",
								  key));

			if (ContainsKey(key))
				throw new ArgumentException(
					String.Format("The section {0} does already exist", key));

			InISection section = new InISection();
			sections.Add(key, section);
			return section;
		}

		#endregion io methods

		#region equality member

		/// <summary>
		///     Determines whether the specified <see cref="System.Object" /> is equal to this instance.
		/// </summary>
		/// <param name="obj">
		///     The <see cref="System.Object" /> to compare with this instance.
		/// </param>
		/// <returns>
		///     <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
		/// </returns>
		public override bool Equals(object obj)
		{
			if (obj.GetType() != typeof (InIReader))
				return false;

			InIReader inIReader = (InIReader) obj;

			if (inIReader.Values.Count != Values.Count ||
			    inIReader.Keys.Count != Keys.Count)
				return false;

			return this.All(pair => pair.Value.Equals(inIReader[pair.Key]));
		}

		/// <summary>
		///     Equalses the specified InI reader.
		/// </summary>
		/// <param name="inIReader">The InI reader.</param>
		/// <returns></returns>
// ReSharper disable UnusedMember.Global
		public bool Equals(InIReader inIReader)
// ReSharper restore UnusedMember.Global
		{
			return Equals(sections, inIReader.sections);
		}

		/// <summary>
		///     Returns a hash code for this instance.
		/// </summary>
		/// <returns>
		///     A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
		/// </returns>
		public override int GetHashCode()
		{
			return (sections != null ? sections.GetHashCode() : 0);
		}

		/// <summary>
		///     Returns a <see cref="System.String" /> that represents this instance.
		/// </summary>
		/// <returns>
		///     A <see cref="System.String" /> that represents this instance.
		/// </returns>
		public override string ToString()
		{
			StringBuilder builder = new StringBuilder();

			foreach (var pair in this)
			{
				var section = pair.Value.ToString();
				if (!String.IsNullOrWhiteSpace(section))
				{
					builder.Append("[");
					builder.Append(pair.Key);
					builder.Append("]\n");
					builder.Append(section);
					builder.Append("\n");
				}
			}

			return builder.ToString();
		}

		#endregion equality member

		#region interface IEnumerable<KeyValuePair<string, InISection>>

		/// <summary>
		///     Gets the enumerator.
		/// </summary>
		/// <returns></returns>
		public IEnumerator<KeyValuePair<string, InISection>> GetEnumerator()
		{
			return sections.GetEnumerator();
		}

		/// <summary>
		///     Returns an enumerator that iterates through a collection.
		/// </summary>
		/// <returns>
		///     An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
		/// </returns>
		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		#endregion interface IEnumerable<KeyValuePair<string, InISection>>

		#region public properties

		/// <summary>
		///		Accessed via the setter, the section will be replaced. (To not replace the section, use Add(..) or
		///  Set(..) Methods).
		///		Accessing the getter, will either create a new section, if the section does not already exists, or
		///		will return the existing section associated to the key.
		/// </summary>
		/// <value>
		///     The <see cref="InISection" />.
		/// </value>
		/// <param name="section">The key.</param>
		/// <returns></returns>
		/// <exception cref="System.ArgumentNullException">The key must not be empty.</exception>
		/// <exception cref="System.ArgumentOutOfRangeException">InIReader does not Contain the searched section</exception>	
		/// <exception cref="System.ArgumentNullException">The keys and the section must not be empty</exception>
		public InISection this[string section]
		{
			get
			{
				if (ContainsKey(section))
					return Get(section);
				return Add(section);
			}
// ReSharper disable UnusedMember.Global
			set
// ReSharper restore UnusedMember.Global
			{
				if (ContainsKey(section))
				{
					Set(section, value);
				}
				else
				{
					Add(section, value);
				}
			}
		}
		
		/// <summary>
		///     Gets the value collection.
		/// </summary>
		/// <value>
		///     The value collection
		/// </value>
// ReSharper disable MemberCanBePrivate.Global
		public Dictionary<string, InISection>.ValueCollection Values { get { return sections.Values; } }
// ReSharper restore MemberCanBePrivate.Global

		/// <summary>
		///     Gets the key collection.
		/// </summary>
		/// <value>
		///     The key collection.
		/// </value>
// ReSharper disable MemberCanBePrivate.Global
		public Dictionary<string, InISection>.KeyCollection Keys { get { return sections.Keys; } }
// ReSharper restore MemberCanBePrivate.Global

		#endregion public properties

		#region direct getter / setter 

		#region setter

		#region add

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section
		/// but if, the key does already exist, then an exception is raised.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key.</param>
		/// <param name="value">The value.</param>
		/// <exception cref="System.ArgumentException">
		///     An Invalid key causes an Exception. The exception is also raised if this section
		///     already contain's the key.
		/// </exception>
		/// <exception cref="System.ArgumentNullException">
		///     The key must not be empty. The value may be null, but not the key.
		/// </exception>
		/// <exception cref="System.ArgumentException">invalid section name.</exception>
		public void Add(string section, string key, string value)
		{
			(ContainsKey(section) ? Get(section) : Add(section)).Add(key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key.</param>
		/// <param name="value">The value.</param>
		/// <exception cref="System.ArgumentException">
		///     An Invalid key causes an Exception. The exception is also raised if this section
		///     already contain's the key.
		/// </exception>
		/// <exception cref="System.ArgumentNullException">
		///     The key must not be empty. The value may be null, but not the key.
		/// </exception>
		/// <exception cref="System.ArgumentException">invalid section name.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAs<T>(string section, string key, T value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable CompareNonConstrainedGenericWithNull
			if(value == null)
// ReSharper restore CompareNonConstrainedGenericWithNull
				throw new ArgumentNullException("value must not be null");

			Add(section, key, value.ToString());
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsBoolean(string section, string key, Boolean value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Boolean>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Byte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsByte(string section, string key, Byte value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Byte>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.SByte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsSByte(string section, string key, SByte value)
// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<SByte>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Char reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsChar(string section, string key, Char value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Char>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Decimal reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsDecimal(string section, string key, Decimal value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Decimal>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Double reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsDouble(string section, string key, Double value)
// ReSharper restore UnusedMember.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Double>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsSingle(string section, string key, Single value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Single>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt16(string section, string key, Int16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int16>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt16(string section, string key, UInt16 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt16>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt32(string section, string key, Int32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int32>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt32(string section, string key, UInt32 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt32>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsInt64(string section, string key, Int64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<Int64>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable MemberCanBePrivate.Global
		public void AddAsUInt64(string section, string key, UInt64 value)
// ReSharper restore MemberCanBePrivate.Global
		{
// ReSharper disable RedundantTypeArgumentsOfMethod
			AddAs<UInt64>(section, key, value);
// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		#region alternate names

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsFloat(string section, string key, Single value)
// ReSharper restore UnusedMember.Global
		{
			AddAsSingle(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsShort(string section, string key, Int16 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt16(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsUShort(string section, string key, UInt16 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt16(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsInt(string section, string key, Int32 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt32(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsUInt(string section, string key, UInt32 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt32(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsLong(string section, string key, Int64 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsInt64(section, key, value);
		}

		/// <summary>
		///     Adds the new entry. If the section does already exist, the key will be appended to the section but if, the key does already exist, then an exception is raised. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The section, key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentException">An Invalid section, key causes an Exception. The exception is also raised if this section already contain's the section, key.</exception>
		/// <exception cref="System.ArgumentNullException">The section, key must not be empty.</exception>
		/// <exception cref="ArgumentNullException">The value must not be null.</exception>
// ReSharper disable UnusedMember.Global
		public void AddAsULong(string section, string key, UInt64 value)
// ReSharper restore UnusedMember.Global
		{
			AddAsUInt64(section, key, value);
		}

		#endregion alternative names

		#endregion add

		#region set

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call
		///     reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.ArgumentNullException">Due to the ToString() call, the value must not be null.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAs<T>(string section, string key, T value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable CompareNonConstrainedGenericWithNull
			if (value == null)
				// ReSharper restore CompareNonConstrainedGenericWithNull
				throw new ArgumentNullException("The value must not be null");

			this[section].Add(key, value.ToString());
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsBoolean(string section, string key, Boolean value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Boolean>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Byte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsByte(string section, string key, Byte value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Byte>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.SByte reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsSByte(string section, string key, SByte value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<SByte>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Char reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsChar(string section, string key, Char value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Char>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Decimal reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsDecimal(string section, string key, Decimal value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Decimal>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Double reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsDouble(string section, string key, Double value)
		// ReSharper restore UnusedMember.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Double>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsSingle(string section, string key, Single value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Single>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt16(string section, string key, Int16 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int16>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes UInt16 connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt16(string section, string key, UInt16 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt16>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt32(string section, string key, Int32 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int32>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt32(string section, string key, UInt32 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt32>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsInt64(string section, string key, Int64 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<Int64>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable MemberCanBePrivate.Global
		public void SetAsUInt64(string section, string key, UInt64 value)
		// ReSharper restore MemberCanBePrivate.Global
		{
			// ReSharper disable RedundantTypeArgumentsOfMethod
			SetAs<UInt64>(section, key, value);
			// ReSharper restore RedundantTypeArgumentsOfMethod
		}

		#region alternate names

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Single reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsFloat(string section, string key, Single value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsSingle(section, key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int16 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsShort(string section, string key, Int16 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsInt16(section, key, value);
		}

		/// <summary>
		///     Changes UInt16 connected to the given key in this section. Typesafe function call for the
		///     type System.Boolean reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsUShort(string section, string key, UInt16 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsUInt16(section, key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsInt(string section, string key, Int32 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsInt32(section, key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt32 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsUInt(string section, string key, UInt32 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsUInt32(section, key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.Int64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsLong(string section, string key, Int64 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsInt64(section, key, value);
		}

		/// <summary>
		///     Changes value connected to the given key in this section. Typesafe function call for the
		///     type System.UInt64 reduces unwanted errors, with implicite type conversion.
		/// </summary>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <param name="value">The entry's value.</param>
		/// <param name="section">The section.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be null or empty</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">
		///     The section must containt the key.
		/// </exception>
		// ReSharper disable UnusedMember.Global
		public void SetAsULong(string section, string key, UInt64 value)
		// ReSharper restore UnusedMember.Global
		{
			SetAsUInt64(section, key, value);
		}

		#endregion alternative names

		#endregion set

		#endregion setter

		#region getter

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value to a boolean.
		///     Converts the specified string representation of a logical value to its System.Boolean equivalent, or throws
		///     an exception if the string is not equivalent to the value of System.Boolean.TrueString or System.Boolean.FalseString.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="ArgumentNullException">value is null</exception>
		/// <exception cref="FormatException">value is not equivalent to the value of the System.Boolean.TrueString or System.Boolean.FalseString field.</exception>
		/// <returns>true if value is equivalent to the value of the System.Boolean.TrueString field; false if value is equivalent to the value of the System.Boolean.FalseString field.</returns>
		// ReSharper disable UnusedMember.Global
		public Boolean GetAsBoolean(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsBoolean(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value to a byte. A byte value that is equivalent to the number contained in string value.
		///     The string is interpreted using the System.Globalization.NumberStyles.Integer style.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">value represents a number less than System.Byte.MinValue or greater than System.Byte.MaxValue.</exception>
		/// <returns>A byte value that is equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Byte GetAsByte(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsByte(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value to a signed byte. A signed byte value that is equivalent to the number contained in string value.
		///     The string is interpreted using the System.Globalization.NumberStyles.Integer style.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">value represents a number less than System.SByte.MinValue or greater than System.SByte.MaxValue.</exception>
		/// <returns>An 8-bit signed integer that is equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public SByte GetAsSByte(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsSByte(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value to a char.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">The length is not 1</exception>
		/// <returns>A Unicode character equivalent to the sole character in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Char GetAsChar(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsChar(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value to a decimal.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Decimal.MinValue or greater than System.Decimal.MaxValue.
		/// </exception>
		/// <returns>The equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Decimal GetAsDecimal(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsDecimal(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the value representation of a
		///     number to its double-precision floating-point number equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.Double.MinValue or greater than System.Double.MaxValue.
		/// </exception>
		/// <returns>A double-precision floating-point number that is equivalent to the numeric value or symbol specified in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Double GetAsDouble(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsDouble(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its single-precision floating-point number equivalent..
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     represents a number less than System.Single.MinValue or greater than System.Single.MaxValue.
		/// </exception>
		/// <returns>A single-precision floating-point number equivalent to the numeric value or symbol specified in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public Single GetAsSingle(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsSingle(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 16-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int16.MinValue or greater than System.Int16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public Int16 GetAsInt16(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsInt16(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. CConverts the string representation of a number to its 16-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt16.MinValue or greater than System.UInt16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public UInt16 GetAsUInt16(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsUInt16(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 32-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int32.MinValue or greater than System.Int32.MaxValue.
		/// </exception>
		/// <returns>A 32-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public Int32 GetAsInt32(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsInt32(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 32-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.UInt32.MinValue or greater than System.UInt32.MaxValue
		/// </exception>
		/// <returns>A 32-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public UInt32 GetAsUInt32(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsUInt32(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 64-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int64.MinValue or greater than System.Int64.MaxValue
		/// </exception>
		/// <returns>A 64-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public Int64 GetAsInt64(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsInt64(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 64-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt64.MinValue or greater than System.UInt64.MaxValue.
		/// </exception>
		/// <returns>A 64-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable MemberCanBePrivate.Global
		public UInt64 GetAsUInt64(string section, string key)
		// ReSharper restore MemberCanBePrivate.Global
		{
			return Get(section).GetAsUInt64(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		// ReSharper disable UnusedMember.Global
		public string GetAsString(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsString(key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section.Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <typeparam name="T">The Enum's type</typeparam>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="ArgumentException">
		///     enumType is not an System.Enum.-or- value is either an empty string or only contains white space.-or- value is a name, but not one of the named constants defined for the enumeration
		/// </exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value is outside the range of the underlying type of enumType
		/// </exception>
		/// <returns>An object of type enumType whose value is represented by value</returns>
		// ReSharper disable UnusedMember.Global
		public T GetAsEnum<T>(string section, string key) where T : struct
		// ReSharper restore UnusedMember.Global
		{
			return Get(section).GetAsEnum<T>(key);
		}

		#region alternative names

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its single-precision floating-point number equivalent..
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     represents a number less than System.Single.MinValue or greater than System.Single.MaxValue.
		/// </exception>
		/// <returns>A single-precision floating-point number equivalent to the numeric value or symbol specified in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Single GetAsFloat(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsSingle(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 16-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int16.MinValue or greater than System.Int16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Int16 GetAsShort(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsInt16(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. CConverts the string representation of a number to its 16-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt16.MinValue or greater than System.UInt16.MaxValue.
		/// </exception>
		/// <returns>A 16-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public UInt16 GetAsUShort(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt16(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 32-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int32.MinValue or greater than System.Int32.MaxValue.
		/// </exception>
		/// <returns>A 32-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Int32 GetAsInt(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsInt32(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 32-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number that is less than System.UInt32.MinValue or greater than System.UInt32.MaxValue
		/// </exception>
		/// <returns>A 32-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public UInt32 GetAsUInt(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt32(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 64-bit signed integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.Int64.MinValue or greater than System.Int64.MaxValue
		/// </exception>
		/// <returns>A 64-bit signed integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public Int64 GetAsLong(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsInt64(section, key);
		}

		/// <summary>
		///     Returns the value connected to the given key in the specified section. Converts the string representation of a number to its 64-bit unsigned integer equivalent.
		/// </summary>
		/// <param name="section">The section.</param>
		/// <param name="key">The key with which the value is accessed.</param>
		/// <exception cref="System.ArgumentNullException">The key must not be empty. The value may be null, but not the key.</exception>
		/// <exception cref="System.Collections.Generic.KeyNotFoundException">The section must containt the key.</exception>
		/// <exception cref="System.ArgumentNullException">value is null</exception>
		/// <exception cref="System.FormatException">value is not in correct format.</exception>
		/// <exception cref="OverflowException">
		///     value represents a number less than System.UInt64.MinValue or greater than System.UInt64.MaxValue.
		/// </exception>
		/// <returns>A 64-bit unsigned integer equivalent to the number contained in the value.</returns>
		// ReSharper disable UnusedMember.Global
		public UInt64 GetAsULong(string section, string key)
		// ReSharper restore UnusedMember.Global
		{
			return GetAsUInt64(section, key);
		}

		#endregion alternative names

		#endregion getter

		#endregion direct getter / setter
	}
}